package com.ruoyi.backend.mapper;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
@DataSource(DataSourceType.SLAVE)
public interface FileMapper {
    @Update("UPDATE backend_inversion_result_data SET file_status = 2 WHERE file_name = #{filename}")
    boolean deleteFile(String filename);

    @Select("SELECT file_status FROM backend_inversion_result_data WHERE file_name = #{fileName}")
    Integer findFileStatusByName(String fileName);
}
